//工具自动生成请勿修改
import { ViewBase } from "odin";
export namespace LanUtil {
	export let getLan: (key: string) => { Value: string };
	export function setUILanguage(ui: MWGameUI.MWUIButton | MWGameUI.MWUITextblock) {
		if (!this.getLan) {
			return;
		}
		let key: string = null;
		if (ui instanceof MWGameUI.MWUIButton) {
			key = ui.getButtonString();
		}
		else {
			key = ui.getText();
		}

		if (key) {
			let lan = this.getLan(key);
			if (lan) {
				if (ui instanceof MWGameUI.MWUIButton) {
					ui.setButtonString(lan.Value)
				}
				else {
					ui.setText(lan.Value);
				}
			}
		}
	}
}
export class UI_GameUI extends ViewBase {
	public xingdong: MWGameUI.MWUIVirtualJoystickPanel;
	public qiang: MWGameUI.MWUIVirtualJoystickPanel;
	public jumPing: MWGameUI.MWUICanvas;
	public jumping: MWGameButton;
	public mWImage_2: MWGameUI.MWUIImage;
	public yinShen: MWGameUI.MWUICanvas;
	public yinshen: MWGameButton;
	public flyIng: MWGameUI.MWUICanvas;
	public mWImage_1: MWGameUI.MWUIImage;
	public flying: MWGameButton;
	public xuetiao: MWGameUI.MWUIProgressbar;
	public shijian: MWGameUI.MWUITextblock;
	public mGoldCount: MWGameUI.MWUITextblock;
	public fengmian: MWGameUI.MWUIImage;
	public kaiShi: MWGameUI.MWUIButton;

    constructor() {
        super("GameUI");
    }
    public buildSelf(): void {
		this.xingdong = this.findChildByPath(MWGameUI.MWUIVirtualJoystickPanel, "Canvas/xingdong");
		this.qiang = this.findChildByPath(MWGameUI.MWUIVirtualJoystickPanel, "Canvas/qiang");
		this.jumPing = this.findChildByPath(MWGameUI.MWUICanvas, "Canvas/jumPing");
		this.jumping = this.findChildByPath(MWGameButton, "Canvas/jumPing/jumping");
		this.mWImage_2 = this.findChildByPath(MWGameUI.MWUIImage, "Canvas/jumPing/mWImage_2");
		this.yinShen = this.findChildByPath(MWGameUI.MWUICanvas, "Canvas/yinShen");
		this.yinshen = this.findChildByPath(MWGameButton, "Canvas/yinShen/yinshen");
		this.flyIng = this.findChildByPath(MWGameUI.MWUICanvas, "Canvas/flyIng");
		this.mWImage_1 = this.findChildByPath(MWGameUI.MWUIImage, "Canvas/flyIng/mWImage_1");
		this.flying = this.findChildByPath(MWGameButton, "Canvas/flyIng/flying");
		this.xuetiao = this.findChildByPath(MWGameUI.MWUIProgressbar, "Canvas/xuetiao");
		this.shijian = this.findChildByPath(MWGameUI.MWUITextblock, "Canvas/shijian");
		this.mGoldCount = this.findChildByPath(MWGameUI.MWUITextblock, "Canvas/MWCanvas_1/mGoldCount");
		this.fengmian = this.findChildByPath(MWGameUI.MWUIImage, "Canvas/fengmian");
		this.kaiShi = this.findChildByPath(MWGameUI.MWUIButton, "Canvas/kaiShi");
		LanUtil.setUILanguage(this.shijian);
		LanUtil.setUILanguage(this.mGoldCount);
		this.kaiShi.onClicked().add(() => {
			Events.dispatchLocal("PlayButtonClick", "kaiShi");
		});
		LanUtil.setUILanguage(this.kaiShi);

    }
}
export class UI_Main extends ViewBase {

    constructor() {
        super("Main");
    }
    public buildSelf(): void {

    }
}
export class UI_UIDie extends ViewBase {
	public shuZhi: MWGameUI.MWUITextblock;

    constructor() {
        super("UIDie");
    }
    public buildSelf(): void {
		this.shuZhi = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/shuZhi");
		LanUtil.setUILanguage(this.shuZhi);

    }
}
export class UI_UIPaihang extends ViewBase {

    constructor() {
        super("UIPaihang");
    }
    public buildSelf(): void {

    }
}
export class UI_UIRoot extends ViewBase {

    constructor() {
        super("UIRoot");
    }
    public buildSelf(): void {
		LanUtil.setUILanguage(this.findChildByPath(MWGameUI.MWUITextblock, "Canvas/Loading/Msg_txt"));

    }
}
export class UI_UIStart extends ViewBase {

    constructor() {
        super("UIStart");
    }
    public buildSelf(): void {

    }
}